package org.siqisource.webstart.core.page;

import java.util.List;

import org.apache.ibatis.session.RowBounds;

public class Ctrl {
	

	public Ctrl() {
		this.start = PageConstants.DEFAULT_PAGENUM;
		this.limit = PageConstants.DEFAULT_NUMPERPAGE;
		this.pageNumShown = PageConstants.DEFAULT_PAGENUMSHOWN;
	}

	/**
	 * 排序数据：排序字段
	 */
	private String sortBy;

	/**
	 * 排序数据：排序方式：asc/desc
	 */
	private String sortDir;

	private int start;

	private int limit;
	
	List<String> selectedIds;

	/**
	 * 分页数据：总记录条数
	 */
	private int totalCount = 0;

	/**
	 * 分页数据: 页标数字显示多少个
	 */
	private int pageNumShown;

	/**
	 * 操作类型
	 */
	private String actionType;
	

	/** 节点Id */
	private Integer id;

	/** 父节点Id */
	private Integer parentId;

	/** 移动类型 */
	private String moveType;

	/** 检索关键字 */
	private String searchKeyWord;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getMoveType() {
		return moveType;
	}

	public void setMoveType(String moveType) {
		this.moveType = moveType;
	}

	public String getSearchKeyWord() {
		return searchKeyWord;
	}

	public void setSearchKeyWord(String searchKeyWord) {
		this.searchKeyWord = searchKeyWord;
	}

	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	public List<String> getSelectedIds() {
		return selectedIds;
	}

	public void setSelectedIds(List<String> selectedIds) {
		this.selectedIds = selectedIds;
	}

	public String getSortBy() {
		return sortBy;
	}

	public void setSortBy(String sortBy) {
		this.sortBy = sortBy;
	}

	public String getSortDir() {
		return sortDir;
	}

	public void setSortDir(String sortDir) {
		this.sortDir = sortDir;
	}

	public int getStart() {
		return start;
	}

	public void setStart(int start) {
		this.start = start;
	}

	public int getLimit() {
		return limit;
	}

	public void setLimit(int limit) {
		this.limit = limit;
	}

	public int getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}

	public int getPageNumShown() {
		return pageNumShown;
	}

	public void setPageNumShown(int pageNumShown) {
		this.pageNumShown = pageNumShown;
	}
	
	public String getActionType() {
		return actionType;
	}

	public void setActionType(String actionType) {
		this.actionType = actionType;
	}

	/**
	 * <p>
	 * Title: getRowBounds
	 * </p>
	 * <p>
	 * Description:
	 * </p>
	 * 
	 * @return 分页对象
	 */
	public RowBounds getRowBounds() {
		return new RowBounds(start, limit);
	}

}
